import React, { FC } from "react";
import styles from "./css/device_add_card.module.scss";
import type { deviceAddListType } from "@/types/echartInterface";
import icon1 from "@/asset/svg/index1.svg";
import icon2 from "@/asset/svg/index2.svg";
const DeviceAddCard: FC<deviceAddListType> = (props: deviceAddListType) => {
  const { color, icon, keys, value } = props;

  return (
    <div className={styles.container}>
      <div className={styles.header} style={{ color }}>{value}</div>
      <div className={styles.img_area}>
        {icon === "1" ? <img src={icon1} alt="" /> : <img src={icon2} alt="" />}
      </div>
      <div className={styles.footer} >
        {keys}
      </div>
    </div>
  );
};

export default DeviceAddCard;
